import Vue from "vue";
import VueRouter from "vue-router";
import MainDashboard from "@/views/MainDashboard.vue";
import LoginPage from "@/views/LoginPage.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/index",
    name: "MainDashboard",
    component: MainDashboard, // 显示 MainDashboard 页面
  },
  {
    path:"/",
    name: "Login",
    component: LoginPage,
  }
];

const router = new VueRouter({
  mode: "history", // 使用 HTML5 History 模式
  base: process.env.BASE_URL, // 基础路径，可根据项目配置
  routes,
});

export default router;
